package org.xymtop.tbdemo.common;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result <T>{
    private String msg;
    private boolean result;
    private T data;

   public static <T> Result<T> success(T data){
       return new Result<>("success",true,data);
   }
   public static <T> Result<T> fail(String msg){
       return new Result<>(msg,false,null);
   }
}
